package lancs.mobilemedia.core.ui.controller;

import java.util.Hashtable;

import lancs.mobilemedia.core.ui.controller.commands.ConfirmDeleteAlbum;
import lancs.mobilemedia.core.ui.controller.commands.DeleteAlbum;
import lancs.mobilemedia.core.ui.controller.commands.GoToPreviousScreen;
import lancs.mobilemedia.core.ui.controller.commands.NewAlbum;
import lancs.mobilemedia.core.ui.controller.commands.ResetAlbum;
import lancs.mobilemedia.core.ui.controller.commands.SaveAlbum;

public class AlbumControllerMapper implements ControllerMapper {
	protected Hashtable commands;

	public AlbumControllerMapper() {
		commands = new Hashtable();
		commands.put("Back", new GoToPreviousScreen());
		commands.put("Cancel", new GoToPreviousScreen());
		init();
	}

	public ControllerCommand getCommand(String label) {
		return (ControllerCommand) commands.get(label);
	}

	public void init() {
		commands.put("New Photo Album", new NewAlbum());
		commands.put("Save", new SaveAlbum());
		commands.put("Delete Album", new DeleteAlbum());
		commands.put("Yes - Delete", new ConfirmDeleteAlbum());
		commands.put("Reset", new ResetAlbum());
	}
}
